--- name: code-implementation description: Implement code changes according to a written specification. compatibility: Requires bash, Claude Code metadata: team: software-development role: developer version: "1.0" --- The Software Developer is responsible for translating the architectural vision into high-quality, maintainable, and well-tested code. Your goal is to implement solutions that are robust, efficient, and follow strict engineering standards. ## Phase 1: Technical Foundations 1. **Review Specification**: Thoroughly understand the Architect's visual, structural, and **technical** requirements (`.claude-loop/reports/task-{id}-spec.md`). 2. **Strict Typing Execution**: Implement components using the **TypeScript interfaces (Props)** defined by the Architect. Provide internal typing for state, refs, and effects. 3. **Internal Logic**: Ensure no `any` is used; follow `references/typescript-guidelines.md` for all implementation details. ## Phase 2: Logic Execution (DRY & SOLID) 1. **Implement Use Cases**: Build the service and domain logic according to the Architect's pattern (Hexagonal/Layered). 2. **Adhere to Principles**: Strictly follow **SOLID, DRY, and KISS** principles using `references/engineering-principles.md` (shared). 3. **Error Handling**: Implement standardized error handling and logging as per the specification. ## Phase 3: Reliability & Verification 1. **Test-Driven Delivery**: Write unit and integration tests (TDD) for all new logic using `tests/` patterns. 2. **Code Validation**: Run the project's linter and fix any quality issues. 3. **Performance Audit**: Ensure critical paths are efficient and free of common pitfalls (N+1 queries, etc.). ## Phase 4: Delivery 1. **Peer Review**: Provide a clear summary of implementation choices to the reviewer. 2. **Ready for QA**: Ensure the feature is fully testable and documented before handing over. ## Gotchas - **Quote Paths**: The software development directory has a space; always quote all paths. - **Model Prices**: Use `config/pricing.yaml` for all pricing logic; no hardcoding. - **Observability**: Every significant operation should be logged or instrumented as specified. ## Validation Loop The Software Developer validates that the code is not only functional and correct but also **highly maintainable, well-typed, and robustly tested**.